package com.yudylaw.algorithm;

public class MaoPaoSort {

	public static void main(String[] args) {
		int[] nums = {9,2,3,8,0,1,10};
		int k ;
		for(int j=0;j<nums.length-1;j++){
			for(int i=0;i<nums.length-j-1;i++){
				if(nums[i]>nums[i+1]){
					k=nums[i];
					nums[i] = nums[i+1];
					nums[i+1] = k;
				}
			}
		}
		
		for(int m=0;m<nums.length;m++){
			System.out.println(nums[m]);
		}
		
	}

}
